﻿<Window x:Class="NUnitResultsExplorer.FontWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Select Font" Height="180" Width="450" WindowStyle="SingleBorderWindow" ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner">
    <Grid Margin="4">
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="2*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition Height="1.2*" />
            <RowDefinition Height="1.2*" />
        </Grid.RowDefinitions>
        <Label Content="_Main Font" VerticalAlignment="Center" />
        <ComboBox Name="cboMain" Grid.Column="1" VerticalAlignment="Center" ItemsSource="{Binding}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Padding="2" Text="{Binding Source}" FontFamily="{Binding}" />
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <Label Grid.Row="1" VerticalAlignment="Center" Content="_Fixed Width Font" />
        <ComboBox Name="cboFixed" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding}" VerticalAlignment="Center">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Padding="2" Text="{Binding Source}" FontFamily="{Binding}" />
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <TextBlock FontFamily="{Binding ElementName=cboMain, Path=SelectedItem}" VerticalAlignment="Center" TextAlignment="Center" Grid.Row="2" Grid.ColumnSpan="2">the quick brown fox jumped over the lazy developer... g</TextBlock>
        <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" HorizontalAlignment="Right">
            <Button Margin="4">_OK</Button>
            <Button Margin="4">_Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
